﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace CRMWebSite.Manage.SystemMaintain.StaffManagement
{
    public partial class StaffAdd : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void imgbtnSave_Click(object sender, ImageClickEventArgs e)
        {
            //var staffClient = ServiceLibiary.GetService.StaffService();

            //CRMWebSite.StaffMangerService.Member staff = new StaffMangerService.Member();
            //staff.name = this.txtName.Text.Trim();
            //staff.account = this.txtId.Text.Trim();
            //staff.sex = this.ddlSex.SelectedValue == "男" ? true : false;
            //staff.state = this.ddlState.SelectedValue == "在职" ? true : false;
            //staff.department = this.txtDepartment.Text.Trim();
            //staff.email = this.txtEmail.Text.Trim();
            //staff.password = FormsAuthentication.HashPasswordForStoringInConfigFile("1111", "MD5");
            //int aa = staff.password.Length;
            //staff.telephone = this.txtTelphone.Text.Trim();
            //staff.position = this.txtPosition.Text.Trim();
            //if (staffClient.IsAccountExist(staff))
            //{
            //    staffClient.AddMember(staff);
            //    Session["MainStaffurl"] = "true";
            //   // Response.Write(" <script> self.close(); </script> ");
            //    Response.Write(" <script> parent.location ='../../../Index.aspx'; </script> ");
            //}
            //else
            //{
            //    lblMessage.Text = "该工号已存在请重新输入！";
            //    this.txtId.Text = "";
            //    this.txtId.Focus();

            //}
        }

        protected void lnkbtnReturn_Click(object sender, EventArgs e)
        {
            Session["MainStaffurl"] = "true";
            Response.Write(" <script> parent.location ='../../../Index.aspx'; </script> ");
        }

     
        
       
    }
}